<?php

$user = $this->user;
if('' != $user->picture)
	$picture = BASE_URL . '/uploads/users/' . $user->picture;
else
{
	$picture = 'http://www.gravatar.com/avatar.php?default=identicon&size=80&gravatar_id=' 
		. md5(strtolower($user->email));
}

?>
<div id="users-profile-header">
	<img alt="<?php echo $this->escape($user->username) ?>" class="float-right" height="80" 
		src="<?php echo $this->escape($picture) ?>" title="<?php echo $this->escape($user->username) ?>" width="80"/>
	<h2><?php echo $this->escape($user->firstname), ' ', $this->escape($user->lastname) ?></h2>
	<p>
		User since <?php echo $user->createdAt->toString('MMMM d YYYY') ?><br/>
		<a href="/users/profile">Perfil</a> |
		<a href="/users/change-password">Cambiar contraseña</a> |
		<a href="/users/change-picture">Cambiar imagen</a>
	</p>
</div>
